﻿// See https://aka.ms/new-console-template for more information
//Console.WriteLine("Hello, World!");

class Program
{
    static void Main(string[] args)
    {
        //var wk = new WarmKiller();
        //此时看不见Kill方法  killer正是如此隐藏身份
        //显示实现
        //IKiller killer = wk;
        IKiller killer = new WarmKiller();
        killer.Kill();

        var wk=(IGetleman)killer;
        wk.Love();
    }
}

interface IGetleman
{
    void Love();
}

interface IKiller
{
    void Kill();
}

class WarmKiller : IGetleman, IKiller
{
   

    public void Love()
    {
        Console.WriteLine("I will love you forever ...");
    }

    //显式的实现
    void IKiller.Kill()
    {
        Console.WriteLine("Let me kill the enemy ...");
    }
}
